package com.blade.helper;

import com.blade.common.utils.ArithUtil;

/**
 * 数据库钱是分为单位的整数，这里统一处理保留两位小数，转成元保留两位小数
 * 返回值格式: "￥整数部分.xx"
 */
public class Money {
    private long theMoney;

    public Money(long theMoney) {
        this.theMoney = theMoney;
    }

    @Override
    public String toString() {
        return "￥" + ArithUtil.formatNumber(ArithUtil.divide(theMoney, 100, 2));
    }
}
